package com.myhome.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.myhome.domain.UserAuthAuditRecord;
import com.myhome.mapper.UserAuthAuditRecordMapper;
import com.myhome.service.UserAuthAuditRecordService;
/**
*@Author QYiXin 
* @Date 2021 10 13 10 51
**/
@Service
public class UserAuthAuditRecordServiceImpl extends ServiceImpl<UserAuthAuditRecordMapper, UserAuthAuditRecord> implements UserAuthAuditRecordService{

    @Override
    public List<UserAuthAuditRecord> getAuthRecordByUserId(Long id) {
        return this.list(new LambdaQueryWrapper<UserAuthAuditRecord>().eq(UserAuthAuditRecord::getUserId, id)
        .orderByDesc(UserAuthAuditRecord::getCreated));
    }
}
